import axios from '@/libs/api.request'

export class SysDataPermissionGroupApi {
  static get (path, params = {}) {
    return request.get(path, createGETParams(params))
  }

  static post (path, params = {}) {
    return request.post(path, params)
  }

  // 根据条件获取数据权限组
  static getList (params) {
    return axios.request({
      url: '/SysDataPermissionGroup/GetList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 根据ID获取数据权限组
  static getModel (params) {
    return axios.request({
      url: '/SysDataPermissionGroup/GetModel',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 保存数据权限组
  static save (params) {
    return axios.request({
      url: '/SysDataPermissionGroup/Save',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 启用/禁用
  static enabledList (params) {
    return axios.request({
      url: '/SysDataPermissionGroup/EnabledList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 删除数据权限组
  static delete (params) {
    return axios.request({
      url: '/SysDataPermissionGroup/Delete',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }
}
